<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATES_PATH;?>/css/address.css">	
<script type="text/javascript" src="<?php echo RESOURCE_PATH;?>/js/jquery.validation.min.js"></script>
<header class="layout head padding-small">
    <a href="javascript:pageBack();" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">修改登录密码</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>
<form id="password_form"  method="post" action="index.php?act=member_index&op=mod_pwd">
<input type="hidden" name="form_submit" value="ok" />
<div class="new-ct">
	<div class="new-addr">
        <div class="new-info-box">
            <div class="new-set-info">
                <span class="new-txt2 new-mg-b5"><em style="color:#F00;">&lowast;</em>您的密码</span>
				<span class="new-input-span new-mg-b5">
					<input type="password" name="orig_password" id="orig_password" maxlength="20" placeholder="请输入您的旧密码"  class="border border-ef7f7e layout padding radius-big " value="" autocomplete="off">
				</span>
				<span class="new-txt2 new-mg-b5"><em style="color:#F00;">&lowast;</em>新密码</span>
                <span class="new-span-block new-mg-b5">
                    <span class="new-input-span">
                    	<input type="password" name="new_password" id="new_password" maxlength="20" placeholder="请输入您新密码"  class="border border-ef7f7e layout padding radius-big " value="" autocomplete="off">
                    </span>
                </span>
                <span class="new-txt2 new-mg-b5"><em style="color:#F00;">&lowast;</em>确认密码</span>
                <span class="new-span-block new-mg-b5">
                    <span class="new-input-span">
                    	<input type="password" name="confirm_password" id="confirm_password" maxlength="20" placeholder="请输入新密码"  class="border border-ef7f7e layout padding radius-big " value="" autocomplete="off">
                    </span>
                </span>
            </div>
            <!--[D] 默认时加  new-abtn-default 把a标签换成span-->
            <a href="javascript:void();" name="order_submit" onclick="$('#password_form ').submit()" class="border-none bg-red text-white layout padding radius-big " style="text-align: center;">提交</a>
        </div>
	</div>
</div>
</form>

<script type="text/javascript">
$(function(){
    $('#password_form').validate({
		errorPlacement: function(error, element){
            var error_td = element.parent('span');
            error_td.find('label').hide();
            error_td.append(error);
        },
        rules : {
            orig_password : {
                required : true 
            },
            new_password : {
                required   : true,
                minlength  : 6,
            },
            confirm_password : {
                required   : true,
                equalTo    : '#new_password'
            }

        },
        messages : {
            orig_password : {
                required : '原始密码不能为空'
            },
            new_password  : {
                required   : '新密码不能为空',
                minlength  : '密码长度6~20位',
            },
            confirm_password : {
                required   : '确认密码不能为空',
                equalTo    : '新密码与确认密码不一致'
            }

        }
    });
});
</script>

